package cn.wolfcode.luowowo.query;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

// 目的地页面:游记排序带范围查询(下拉框-->人均消费-->出行天数)
@Getter
public class TravelCondition {

    // 游记的出行天数(时间)
    public static final Map<Integer,TravelCondition> DAY_MAP = new HashMap<>();
    // 游记的人均花费
    public static final Map<Integer,TravelCondition> PEREXPEND_MAP = new HashMap<>();

    private int min;//最小值
    private int max;//最大值

    // 初始化map
    static{
        // 出行时间
        DAY_MAP.put(1, new TravelCondition(0, 3));
        DAY_MAP.put(2, new TravelCondition(4, 7));
        DAY_MAP.put(3, new TravelCondition(8, 14));
        DAY_MAP.put(4, new TravelCondition(15, Integer.MAX_VALUE));//15-无限

        // 人均消费
        PEREXPEND_MAP.put(1, new TravelCondition(1, 999));
        PEREXPEND_MAP.put(2, new TravelCondition(1000, 6000));
        PEREXPEND_MAP.put(3, new TravelCondition(6001, 20000));
        PEREXPEND_MAP.put(4, new TravelCondition(20001, Integer.MAX_VALUE));//20001-无限
    }

    public TravelCondition(int min,int max) {
        this.min = min;
        this.max = max;
    }


}
